<template>
    <a-modal class="my-modal short" v-model="modal_show" title="切换任务" @ok="modelok" width="400px" :maskClosable="false" :centered="true">
        <div>
            <label class="table-search-label">任务分类：</label>
            <a-select style="width: 210px"  v-model="task_type" size="samll">
                <a-select-option value="bigdata">执法服务</a-select-option>
                <a-select-option value="sample">AI样本</a-select-option>
            </a-select>
        </div>
    </a-modal>
</template>
<script>
export default {
    components: {},
    data() {
        return {
            modal_show: false,
            task_type: '',
        };
    },
    mounted() {
        this.$mitt.$off('bus_change_optype').$on('bus_change_optype', () => {
            this.task_type=this.$store.state.task_type
            this.modal_show = true;
        });
    },
    methods: {
        modelok() {
            if(this.task_type=="bigdata"){
                this.$store.state.task_type="bigdata";
                this.$store.state.type_name="执法服务"
            }
            else{
                this.$store.state.task_type="sample";
                this.$store.state.type_name="AI样本"
            }
            this.modal_show = false;
        },
    },
};
</script>
<style></style>
